import CustomFormRender from './components/CustomFormRender.vue'
import UnitInput from "@/components/UnitInput.vue";
import CusDateTimePicker from "@/components/CustomForm/CusDateTimePicker.vue";
import CusTimePicker from "@/components/CustomForm/CusTimePicker.vue";
import CusSelect from "@/components/CustomForm/CusSelect.vue";
import CusRadio from "@/components/CustomForm/CusRadio.vue";
import CusCheckbox from "@/components/CustomForm/CusCheckbox.vue"
import CusRichText from "@/components/CustomForm/CusRichText.vue"
import CusRichEditor from "@/components/CustomForm/CusRichEditor.vue"
import CusCascader from "@/components/CustomForm/CusCascader.vue"
import CusRate from "@/components/CustomForm/CusRate.vue";
import CusSlider from "@/components/CustomForm/CusSlider.vue";
import CusStyleEditor from "@/components/CustomForm/CusStyleEditor.vue";
import CusColorPicker from "@/components/CustomForm/CusColorPicker.vue";
import CusInputNumber from "@/components/CustomForm/CusInputNumber.vue";
import CusInput from "@/components/CustomForm/CusInput.vue";
import CusAddress from "@/components/CustomForm/CusAddress.vue";
import CusSwitch from "@/components/CustomForm/CusSwitch.vue";
import CusOneOrMany from "@/components/CustomForm/CusOneOrMany.vue";
import CusUploader from "@/components/CustomForm/CusUploader.vue";


import CusSuggest from "@/components/CustomForm/CusSuggest.vue";
import SlotCom from '@/components/SlotCom.vue'
import HttpComponent from '@/components/HttpComponent.vue'

let cachedApp = null



const plugin = {
    install(app) {
        cachedApp = app
        CustomVueComponent.app = app


        CustomVueComponent.register(CustomFormRender)
        CustomVueComponent.register(UnitInput)
        CustomVueComponent.register(CusDateTimePicker)
        CustomVueComponent.register(CusTimePicker)
        CustomVueComponent.register(CusSelect)
        CustomVueComponent.register(CusSuggest)
        CustomVueComponent.register(CusRadio)
        CustomVueComponent.register(CusCheckbox)
        CustomVueComponent.register(CusColorPicker)
        CustomVueComponent.register(CusRate)
        CustomVueComponent.register(CusSlider)
        CustomVueComponent.register(CusRichText)
        CustomVueComponent.register(CusSwitch)
        CustomVueComponent.register(CusCascader)
        CustomVueComponent.register(CusInputNumber)
        CustomVueComponent.register(CusRichEditor)
        CustomVueComponent.register(CusInput)
        CustomVueComponent.register(CusOneOrMany)
        CustomVueComponent.register(CusAddress)
        CustomVueComponent.register(CusUploader)
        CustomVueComponent.register(CusStyleEditor)
        CustomVueComponent.register(SlotCom)
        CustomVueComponent.register(HttpComponent)
    }
};

export default plugin
